package com.qf.mvc01.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/forw")
public class ForwController {

    //转发网页
    @RequestMapping("/test1")
    public String test1(){
        System.out.println("ForwController11111");
        return "/views/user.html";
    }

    //绝对路径，转发其他Controller类方法
    @RequestMapping("/test2")
    public String test2(){
        System.out.println("ForwController2222");
        return "/user/get";
    }

    @RequestMapping("/test3")
    public String test3(){
        System.out.println("ForwController2222");
        //转发相对路径，只对当前类有效
        return "test1";
    }

}
